<template>
  <view class="schedule-card">
    <view class="schedule-image-container">
      <image :src="schedule.image" mode="aspectFill" class="schedule-image" />
      <view class="schedule-status">
        <text class="status-text">{{ schedule.status }}</text>
      </view>
    </view>
    <view class="schedule-info">
      <text class="schedule-title">{{ schedule.title }}</text>
      <view class="schedule-meta">
        <view class="schedule-location">
          <image src="/static/images/location-icon.svg" mode="aspectFit" class="location-icon" />
          <text class="location-text">{{ schedule.location }}</text>
        </view>
        <view class="schedule-date">
          <image src="/static/images/calendar-icon.svg" mode="aspectFit" class="calendar-icon" />
          <text class="date-text">{{ schedule.date }}</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: 'ScheduleCard',
  props: {
    schedule: {
      type: Object,
      required: true
    }
  },
  methods: {
    handleClick() {
      this.$emit('click', this.schedule)
    }
  }
}
</script>

<style>
.schedule-card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
}

.schedule-image-container {
  position: relative;
  width: 100%;
  height: 200px;
}

.schedule-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.schedule-status {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 20px;
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  color: #24C690;
}

.schedule-info {
  padding: 16px;
}

.schedule-title {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 12px;
}

.schedule-meta {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.schedule-location, .schedule-date {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.location-icon, .calendar-icon {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.location-text, .date-text {
  font-size: 14px;
  color: #89807A;
}
</style> 